<?php

require_once('c_lang_lexer.php');
require_once('c_lang_parser.php');

$scanner = new c_lang_lexer(fopen("./c_lang_parser_test.input", "r"));

$parser = new c_lang_yyParser();

while ($token = $scanner->next_token()) {
    $parser->process_token($token);
}
$parser->doParse(0);
//var_dump($parser->ast->root());
$parser->ast->print_dot_tree("c.dot");
?>